package com.atguigu.f_array;

import java.util.Date;

public class Demo3 {
    public static void main(String[] args) {
        //动态初始化数组
        byte[] bys = new byte[2];
        for (int i = 0; i < bys.length; i++) {
            System.out.println(bys[i]);
        }

        short[] shs = new short[2];
        for (int i = 0; i < shs.length; i++) {
            System.out.println(shs[i]);
        }

        int[] arr = new int[2];
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }

        long[] ls = new long[2];
        for (int i = 0; i < ls.length; i++) {
            System.out.println(ls[i]);
        }
        System.out.println("-----------------------");
        float[] fls = new float[2];
        for (int i = 0; i < fls.length; i++) {
            System.out.println(fls[i]);
        }
        double[] ds = new double[2];
        for (int i = 0; i < ds.length; i++) {
            System.out.println(ds[i]);
        }
        System.out.println("-----------------------");
        char[] chs = new char[2];
        for (int i = 0; i < chs.length; i++) {
            System.out.println(chs[i]);
        }
        System.out.println("-----------------------");
        boolean[] flags = new boolean[2];
        for (int i = 0; i < flags.length; i++) {
            System.out.println(flags[i]);
        }
        System.out.println("-----------------------");
        //引用数据类型元素数组 默认值都是null
        String[] names = new String[2];
        for (int i = 0; i < names.length; i++) {
            System.out.println(names[i]);
        }

        Date[] dates = new Date[2];
        for (int i = 0; i < dates.length; i++) {
            System.out.println(dates[i]);
        }
    }
}
